package com.example.dao;


import com.example.entity.Notice;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface NoticeDao extends Mapper<Notice> {


    @Select("select * from notice")
    List<Notice> findNotice(Notice notice);

    @Insert("insert into notice (notice_id, noticename, notice, time) " +
            "VALUES (#{noticeId},#{noticename},#{notice},#{time})")
    void addNotice(Notice notice);
}
